class X {
  a: Boolean|String
  b: (Boolean|String)?
  c: Boolean|String(length >= 3)
  d: (Boolean|String)(this != false)
}

class Y {
  hidden a: (Int|Float) -> String
  hidden b: (Int) -> Float|String
  c: ((Int) -> Float)|String
}

class Z {
  a: String|List<String>
  b: List<Int|Float>
  c: List<Int|List<Float>>
  d: Boolean|Map<Int|List<Int>, String|Set<String>>
  e: Duration|Duration|Duration
  f: DataSize|DataSize?
  g: Pair<Int, Int>|Null
}

class Defaults {
  a: *Set|List|Map
  b: *"Pigeon"|"Parrot"|"Barn Owl"
}

res1 = new X {
  a = true
  b = null
  c = true
  d = true
}

res2 = new X {
  a = "foo"
  b = "foo"
  c = "longer"
  d = "foo"
}

res3 = new Y {
  a = (x) -> "foo"
  b = (x) -> 3.14
  c = "foo"
}

res4 = new Z {
  a = "foo"
  b = List(1, 3.14, 2)
  c = List(1, List(3.12), 2)
  d = true
  e = 5.s
  f = 3.gb
  g = Pair(1, 2)
}

res5 = new Z {
  a = List("foo", "bar")
  b = List(3.14, 1)
  c = List()
  d = Map(
    1, "foo",
    2, Set("foo", "bar"),
    List(1, 2, 3), "foo",
    List(1, 2, 3), Set("foo", "bar")
  )
  e = 1.s
  f = null
  g = null
}

res6 = new Defaults {}
